/**
 * Created by Administrator on 2019/1/8.
 */
import Vue from 'vue'
import store from '@/store';
console.log(store.commit)
export  function  closeWinow() {
  window.onload = function (e) {
    // e = e || window.event;
    // console.log()
    // // 兼容IE8和Firefox 4之前的版本
    // if (e) {
    //   e.returnValue = '关闭提示';
    // }
    // // Chrome, Safari, Firefox 4+, Opera 12+ , IE 9+
    // return '关闭提示';
    Vue.prototype.axios.get('/api/v1/accout/userlogin')
      .then((res)=>{
        store.commit('changeLoginStatus',{
          isExit:0
        });
        store.commit('saveUid',{
          user_id:'',
          token:'',
          user_name:''
        })
        localStorage.setItem('user_id','')
        localStorage.setItem('user_name','')
        localStorage.setItem('token','');
        // this.$router.push({
        //   path:'/'
        // });
      })

  };
};

export  function exitFn(){


}
